#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

char* My_strncat(char* destination, const char* source, int num)
{
	int i = 0, j = 0;
	while (*(destination + i) != '\0')
	{
		i++;
	}
	for (j = 0; j < num; j++)
	{
		*(destination + i + j) = *(source + j);
	}
	return destination;
}

int main()
{
	char arr1[50] = "Hello";
	char arr2[] = " world!";

	My_strncat(arr1, arr2, sizeof(arr2));
	printf("%s\n", arr1);

	return 0;
}
